export const routerPath = {
    home: "/home",
    category: "/category",
    shoppingCart: "/shoppingCart",
    profile: "/profile",
    detail: "/detail",
    login: "/login"
};

export const POP = 'pop';
export const NEW = 'new';
export const SELL = 'sell';

export const LOGIN_CODE = "takeshi-login-code";
export const LOGIN_TOKEN = "takeshi-login-token";
export const USER_INFO = "takeshi-user-info";
export const SHOPPING_CART = "takeshi-shopping-cart";

export class BScrollClass {

    setExcessHeight(excessHeight = 0) {
        this.excessHeight = excessHeight;
        return this;
    }

    setProbeType(probeType = 0) {
        this.probeType = probeType;
        return this;
    }

    setDistance(distance = 1000) {
        this.distance = distance;
        return this;
    }

    setScrollToTime(scrollToTime = 300) {
        this.scrollToTime = scrollToTime;
        return this;
    }

    setShowBackToTop(showBackToTop = true) {
        this.showBackToTop = showBackToTop;
        return this;
    }

    setImgLoadFunName(imgLoadFunName = "imgLoad") {
        this.imgLoadFunName = imgLoadFunName;
        return this;
    }

    setPullDownRefresh(pullDownRefresh = false) {
        this.pullDownRefresh = pullDownRefresh;
        return this;
    }

    setPullUpLoad(pullUpLoad = 0) {
        this.pullUpLoad = pullUpLoad;
        return this;
    }

    constructor(excessHeight = 0, probeType = 0, distance = 1000, scrollToTime = 300,
                showBackToTop = true, imgLoadFunName = "imgLoad", pullDownRefresh = false,
                pullUpLoad = 0) {
        this.excessHeight = excessHeight;
        this.probeType = probeType;
        this.distance = distance;
        this.scrollToTime = scrollToTime;
        this.showBackToTop = showBackToTop;
        this.imgLoadFunName = imgLoadFunName;
        this.pullDownRefresh = pullDownRefresh;
        this.pullUpLoad = pullUpLoad;
    }

}